package demo.service;

import com.github.pagehelper.PageInfo;
import demo.response.RestResponseVO;
import demo.entity.Register;
import demo.response.ServerResponse;

import java.util.List;

public interface RegisterService {

    RestResponseVO insert(Register register);

    RestResponseVO delById(Integer id);

    RestResponseVO updateById(Register register);

    RestResponseVO registerCompetition(Integer userId,Integer compId,String password);

    RestResponseVO isRegisterCompetition(Integer userId, Integer compId);


    RestResponseVO<PageInfo> listRegisterByCompId2Page(Integer compId, Integer pageNum, Integer pageSize);


    ServerResponse addSolutionCountByProblemIdCompIdUserId(Integer problemId, Integer compId, Integer userId);

    ServerResponse addSubmitCountByCompIdUserId(Integer compId, Integer userId);

    ServerResponse addAcCountByCompIdUserId(Integer compId, Integer userId);

    ServerResponse updateScore(Integer score,Integer compId, Integer userId);

    Register getRegisterByCompIdandUserId(Integer compId, Integer userId);



}
